package com.shuai.chatroom.mapper;

import com.shuai.chatroom.entity.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface UserMapper {
    /**
     * 用户注册
     */
    int register(UserInfo userInfo);
    /**
     * 用户登录
     */
    UserInfo login(@Param("username") String username);

    /**
     * 上传用户头像
     */
    int uploadPhoto(@Param("uId") Integer uId,@Param("photo") String photo);

    List<UserInfo> getUsersLikeName(@Param("username") String username);
}
